package com.sl.biz.modular.job.service;


import com.sl.biz.domain.request.JobPageParamRpcRequest;
import com.sl.biz.modular.job.controller.request.JobAddRequest;
import com.sl.biz.modular.job.controller.request.JobGetByIdRequest;
import com.sl.biz.modular.job.controller.request.JobUpdateByIdRequest;
import com.sl.biz.modular.job.dao.entity.JobConfigDO;

import java.util.Date;
import java.util.List;

public interface JobConfigBizService {

    void init();

    JobConfigDO getById(JobGetByIdRequest jobGetByIdRequest);

    String add(JobAddRequest jobAddRequest);

    Boolean updateById(JobUpdateByIdRequest updateByIdRequest);

    Boolean pause(String id);

    Boolean resume(String id);

    Boolean runOnce(String id);

    List<JobConfigDO> list(JobConfigDO jobConfigDO);

    List<JobConfigDO> page(JobPageParamRpcRequest jobPageParamRpcRequest);


    Boolean remoteById(String id);

    Boolean run(String id);

    Date nextFireTime(String id);

    Object execute(String jobId);


    boolean count(String beanName, String cron, String excludeId);
}
